package com.kaoshi.company.controller;

import com.kaoshi.common.config.Result;
import com.kaoshi.company.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("company")
public class CompanyController {
    @Autowired
    private CompanyService companyService;
    //http://localhost:9000/company/list
    //全查
    @GetMapping("list")
    public Result getCompanyList(){

        return Result.ok(companyService.list());
    }
}
